<template>
	<view class="hui">
		<view class="list_box">
			<view class="info_box">
				<view class="b_b b_m_b">用户信息</view>
				<view class="b_flex_c_s b_m_b">
					<view>用户昵称:{{info.nickname}}</view>
					<view>电话:{{info.phone}}</view>
				</view>
				<view class="b_b b_m_b">订单信息</view>
				<view>订单编号：{{ info.orderId }}</view>
				<view class="b_m_b">医院名称：{{ info.hospitalName }}</view>
				<view class="b_m_b">设备编码：{{ info.deviceNumber }}</view>
				<view class="b_m_b">价格类型： <span v-if="info.chargingMethod=='hour'">按时收费</span>
					<span v-else>按次收费</span>
				</view>

				<view class="b_m_b">使用计费：{{ info.price-info.timeoutPrice }}</view>
				<view class="b_m_b">超时费用：{{ info.timeoutPrice }}</view>
				<view class="b_m_b">使用状态： <span v-if="info.complete">已完成</span>
					<span v-else>使用中</span>
				</view>
				<view class="b_m_b">开始时间：{{ info.createTime }}</view>
				<view class="b_m_b">结束时间：{{ info.completeTime?info.completeTime:'' }}</view>
				<view class="b_m_b">租用押金：{{ info.deposit?info.deposit:'' }}</view>
				<view class="b_m_b">使用时长：{{ info.leaseTimes }}</view>
				<view class="">创建时间：{{ info.createTime }}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		adminInfo
	} from '@/require/api.js';
	export default {
		data() {
			return {
				info: {}
			}
		},
		onLoad(data) {
			this.getInfo(data.id);
		},
		created() {

		},
		methods: {
			async getInfo(id) {
				let {
					data
				} = await adminInfo({
					id: id
				});
				this.info = data;
			}
		}
	}
</script>

<style lang="scss" scoped>
	.list_box {
		box-sizing: border-box;
		padding: 0 25rpx 0 25rpx;
		background: #fff;
	}

	.b_b {
		border-bottom: 1rpx solid #E6E6E6;
	}

	.info_box {
		box-sizing: border-box;
		padding: 20rpx 0;

		font-size: 28rpx;
	}
</style>